from pydantic_settings import BaseSettings
from typing import Optional

class Settings(BaseSettings):
    # MongoDB配置
    MONGODB_URI: str = "mongodb://root:example@10.70.222.31:27017"
    DATABASE_NAME: str = "Agent"
    
    # JWT配置
    SECRET_KEY: str = "db7f2b71b736f507e78be45f525e645971baae354ab04e59db0df011f4e13151"
    ALGORITHM: str = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 1
    
    # 应用配置
    APP_TITLE: str = "User Management API"
    APP_DESCRIPTION: str = "A FastAPI application with MongoDB for user management and authentication"
    APP_VERSION: str = "1.0.0"
    HOST: str = "127.0.0.1"
    PORT: int = 8000
    
    class Config:
        env_file = ".env"

settings = Settings()